<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    //深拷贝
    function copyObj(Obj){
        var res =Arraay.isArray(obj)?[]:{}
        for(var key in obj){
            if(typeof ob[key]==Object){
                res[key]=copyObj(obj[key])
            }
            else{
                res[key]=obj[key]
            }
        }
        return res
    }

    //大小写转换
    var str = 'HelloWrLd'
    function getHt(str){
        var arr = str.split('')
        var newarr = arr.map((item) => {return item ==item.toUpperCase() ? item.toLowerCase():item.toUpperCase()})
        return newarr.join('')
    }
    console.log(getHt(str));

    //URL
    var str = 'username=admin&password=123456'
    var arr = str.split("&")
    var obj = {}
    for(let i = 0;i<arr.length;i++){
        var ele = arr[i].split('=');
        obj[ele[0]]=ele[1]
    }
    console.log(obj);

    //js字符串排列组合
</script>